Ext.chooseEventReceiverWindow = Ext.extend(Ext.Window,{
	modal:true,
	title:'选择接收者',
	cloasable : true,
	autoHeight : true,
	autoWidth : true,
	layout:'fit',
	buttonAlign: 'center',
	buttons : [{
	        	   xtype:'button',
	        	   text : '确定',
	        	   handler : function(){
//						var a = this.findParentBy(function(ct,cmp){
//							return (ct instanceof Ext.Window) ? true : false;
//						});
//						var hasChose = a.grid.getSelectionModel().getSelected();
//						if(hasChose){
//							var chooice = pm_currentwindow.grid.getSelectionModel().getSelections();
//							var generalManagerId = chooice[0].get("generalmanagerid");
//							var generalManagerName = chooice[0].get("generalmanagername");
//							
//							
//						}else{
//							Ext.Msg.alert('选择接收者', '请选择一个接收者!');
//						}
			       }
	           },{
	        	   xtype : 'button',
	        	   text : '取消',
	        	   handler : function(b, e){
//	        	   		var a = this.findParentBy(function(ct,cmp){
//	        	   			return (ct instanceof Ext.Window) ? true : false;
//	        	   		});
//	        	   		a.close();
	           	   }
	           }],
	initComponent : function(){
	var receiverReader = new Ext.data.JsonReader(
			{
				root : 'list',
				totalProperty : 'totalCount',
				id : 'id',
				successProperty : '@success'
			}, 
			[ {
				name : 'generalmanagerid',
				mapping : 'generalmanagerid'
			}, {
				name : 'generalmanagername',
				mapping : 'generalmanagername'
			}, {
				name : 'jobnumber',
				mapping : 'jobnumber'
			},{
				name : 'sparefield1',
				mapping : 'sparefield1'
			}, {
				name : 'sparefield2',
				mapping : 'sparefield2'
			}, {
				name : 'sparefield3',
				mapping : 'sparefield3'
			}]);
	
	
	var receiverStore =  new Ext.data.Store({
		proxy: new Ext.data.HttpProxy({
            url: 'projectManage/projectManageAction!getAllGeneralManager'
        }),
        pageSize : 20,
        reader : receiverReader
	});
		
		this.sm = new Ext.grid.CheckboxSelectionModel({
			singleSelect: false
		});
		this.grid =  new Ext.grid.GridPanel({
			id:'receverPanel',
			store : receiverStore,
			height : 300,
			width : 420,
			listeners:{
		    	render:function(){
		         	var hd_checker = this.getEl().select('div.x-grid3-hd-checker');
		         	if (hd_checker.hasClass('x-grid3-hd-checker')) {   
		         		hd_checker.removeClass('x-grid3-hd-checker'); // 去掉全选框 
		            } 
		   		}
		    },	
			sm: this.sm,
			cm  :  new Ext.grid.ColumnModel([ new Ext.grid.RowNumberer(),this.sm, 
			{
				header : '姓名',
				dataIndex : 'generalmanagername',
				width : 100
			}, {
				header : '工号',
				dataIndex : 'jobnumber',
				width : 200
			}]),
			bbar :  new Ext.PagingToolbar({
				pageSize : 20,
				store : receiverStore,
				displayInfo : true,
				displayMsg : '显示 {0}-{1}条 / 共 {2} 条',
				emptyMsg : "无数据。",
				plugins : [new Ext.ux.PageSizePlugin()],
				items : ['-']
			})
		});
		this.items = this.grid;

	Ext.chooseEventReceiverWindow.superclass.initComponent.call(this);
}
});